<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    593. Valid Square
   </h1>
   <p>
    Given the coordinates of four points in 2D space, return whether the four points could construct a square.
   </p>
   <p>
    The coordinate (x,y) of a point is represented by an integer array with two integers.
   </p>
   <p>
    <b>
     Example:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,1]
<b>Output:</b> True
</pre>
   <p>
    Note:
   </p>
   <ol>
    <li>
     All the input integers are in the range [-10000, 10000].
    </li>
    <li>
     A valid square has four equal sides with positive length and four equal angles (90-degree angles).
    </li>
    <li>
     Input points have no order.
    </li>
   </ol>
  </div>
  <div>
   <h1 class="question_title">
    593. 有效的正方形
   </h1>
   <p>
    给定二维空间中四点的坐标，返回四点是否可以构造一个正方形。
   </p>
   <p>
    一个点的坐标（x，y）由一个有两个整数的整数数组表示。
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,1]
<strong>输出:</strong> True
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ol>
    <li>
     所有输入整数都在 [-10000，10000] 范围内。
    </li>
    <li>
     一个有效的正方形有四个等长的正长和四个等角（90度角）。
    </li>
    <li>
     输入点没有顺序。
    </li>
   </ol>
  </div>
 </body>
</html>